﻿namespace BSDS.Core.Data.Remote.Account
{
    public class DataSourceInfo
    {
        public string Name { get; private set; }
        public string EntityTypeName { get; private set; }
        public string AccessId { get; private set; }
        public string Href { get; private set; }
        public string LastUpdate { get; set; }

        public DataSourceInfo(string name, string entityTypeName, string aHref, string lastUpdate)
        {
            Name = name;
            EntityTypeName = entityTypeName;
            Href = aHref;
            LastUpdate = lastUpdate;

            var parts = aHref.Split('/');
            AccessId = parts[parts.Length - 3];
        }
    }
}